<template>
  <div class="container">
    <div class="shotbox">
      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
        <el-breadcrumb-item><a href="/">新闻中心</a></el-breadcrumb-item>
        <el-breadcrumb-item><a href="/new-list">新闻列表</a></el-breadcrumb-item>
        <el-breadcrumb-item>新闻详情</el-breadcrumb-item>
      </el-breadcrumb>
      <h1 style="text-align: center;font-size: 30px;margin: 30px 0;">{{ title }}</h1>
      <!-- <div class="ql-container ql-snow"> -->
        <div class="ql-editor" v-html="context"></div>
      <!-- </div> -->
      <!-- <div class="taxt" v-html="context"></div> -->
    </div>
  </div>
</template>
<script>
import {getNewDetail} from '@/api/official'
import http from '@/utils/baseUrl'
import "quill/dist/quill.core.css";
export default {
  components:{
  },
  mounted() {
    this.getNew()
  },
  data () {
    return {
      url: http,
      new:{},
      context:'',
      title:''
    }
  },
  methods:{
    getNew() {
      let params = this.$route.params.id
      getNewDetail(params).then(res => {
        this.new = res.data
        console.log(this.new.context)
        this.context = this.new.context
        this.title = this.new.title
      })
    }
  }
}
</script>
<style scoped>
.new-list {
  margin-bottom: 15px;
}
.new-box {
  clear: both;
  height: 200px;
}
.new-left {
  float: left;
  width: 20%;
  padding: 15px;
}
.new-right {
  float: right;
  width: 74%;
  padding: 15px;
}
.new-right p {
  padding-left: 2em;
  text-indent: 2em;
  font-size: 16px;
  text-align: justify;
  line-height: 26px;
  overflow: hidden;
  height: 160px;
}
.el-card__body, .el-main {
    padding: 0px;
}
/* .new-list {
  margin-bottom: 10px;
  display: flex;
  flex-direction: row;
  display: inline-block;
}
.new-list .box {
  width: 100%;
  height: 165px;
  clear: both;
}
.left {
  float: left;
  width: 20%;
  height: 160px;
}
.right {
  float: right;
  width: 75%;
}
.new-list .box .content {
  padding-left: 2em;
  text-indent: 2em;
  font-size: 16px;
  text-align: justify;
  line-height: 26px;
  overflow: hidden;
  height: 160px;
} */
</style>
